<?php 
if(!isset($_SESSION)) session_start();


if (isset($_REQUEST["study_year"])) $study_year = $_REQUEST["study_year"];
else if (isset($_SESSION["study_year"])) $study_year = $_SESSION["study_year"];

if (isset($_REQUEST["ProspectusCode"])) $ProspectusCode = $_REQUEST["ProspectusCode"];
else if (isset($_SESSION["ProspectusCode"])) $ProspectusCode = $_SESSION["ProspectusCode"];



header("Content-type: text/xml"); 
//echo $_SESSION["study_year"];
//$study_year = $_SESSION["study_year"];
//$study_year = 2011;

//http://www.peterborough.ac.uk/prc/service.asmx/ObtainProspectus?StudyYear=string&ProspectusCode=string

$params = "StudyYear={$study_year}&ProspectusCode={$ProspectusCode}";
$feed = "http://{$_SERVER['SERVER_NAME']}/WebServices/PRC/service.asmx/ObtainProspectus?{$params}";

$xml = simplexml_load_file($feed);
//$xml = str_replace("utf&#x2013;8", "utf-8", $xml);
echo $xml;

?>